<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->comment('名字');
            $table->string('attendance_no')->comment('考勤序列号');
            $table->string('teambition_sign')->comment('teambition用户ID串');
            $table->string('teambition_token');
            $table->string('email');
            $table->string('avatar')->comment('头像');
            $table->string('telephone');
            $table->date('entry_date')->comment('入职时间');
            $table->date('leave_date')->comment('离职时间');
            $table->date('birthday');
            $table->boolean('is_admin');
            $table->string('status')->comment('员工状态');
            $table->integer('department_id')->comment('部门ID');
            $table->integer('position_id')->comment('职位ID');
            $table->integer('user_type_id')->comment('员工类型ID');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
